import {createPinia, defineStore} from 'pinia'
import {asyncRoutes} from '../router/index'

const store = createPinia()
export {store}

export const mainStore = defineStore('main', {
    state: () => ({
        // 侧边宽度
        asideWidth: "250px",
        // 菜单信息
        menus: asyncRoutes,
    }),
    getters: {

    },
    actions: {
        handleAsideWidth() {
            this.asideWidth = this.asideWidth === "250px" ? "64px" : "250px"
        }
    }
})